import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'; // 导入element-ui包
import 'element-ui/lib/theme-chalk/index.css'; // 导入相关样式
import router from './router'
import store from './store'
import axios from 'axios'
// import 'amfe-flexible';


Vue.prototype.$axios = axios;
axios.defaults.baseURL = 'https://www.gongminlingyuanwang.cn/api';

Vue.use(ElementUI); // 引用
Vue.config.productionTip = false

const imgurl = 'https://www.gongminlingyuanwang.cn/'
Vue.prototype.Imgurl = imgurl

// 定义过滤时间过滤器
Vue.filter('dateFormat', date => {
    const newDate = new Date(date * 1000)
    const y = newDate.getFullYear()
    const m = newDate.getMonth() + 1
    const d = newDate.getDate()
    return y + '-' + m + '-' + d
})


new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')